package com.qf.mp2301.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("t_user")  // 说明数据库中的表名
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO) // 数据库自增id策略
//    @TableId(value = "id",type = IdType.ASSIGN_ID) // 数据库自增id策略
    private Long id;

    @TableField("nickname")
    private String name;

    private Integer age;

    private String email;

    private String password;

}
